{% extends 'basenav.html' %}
{% block title %}User{% endblock %}
{% block css %}
<link rel="stylesheet" href="{{url_for('static',filename='css/user-center.css')}}" />
<link rel="stylesheet" href="{{url_for('static',filename='css/font-awesome.min.css')}}" />
{% endblock %}
<title>Document</title>
{% block js %}
<script type="text/javascript" src="../static/js/user-center.js"></script>
{% endblock %}
{% block context %}
<div class="context">
    <div class="left-context">
        <div class="user-self">
            <!--"../static/userhead/head.jpg"-->
            <a href="{{url_for('photo')}}"><img src="{{url_for('static',filename='photo/'+photoname)}}"></a>
            <p class="name">{{username}}</p>
            <p>个人博客:{{profile.blog}}</p>
            <p>简介:{{profile.signature}}</p>
            <button onclick="window.location.href='{{url_for('editinfo')}}'">修改信息</button>
        </div>
    </div>
    <div class="right-context">
        <div class="container-list">
            <div class="tab-custom">
                <div class="tab">
                    <button class="tablinks active" onclick="openList(event, 'tab_1')" style="outline:none;">
                        <p style="font-size: 18px;">关注</p>
                    </button>
                    <button class="tablinks" onclick="openList(event, 'tab_2')" style="outline:none;">
                        <p style="font-size: 18px;">资产</p>
                    </button>
                    <button class="tablinks" onclick="openList(event, 'tab_3')" style="outline:none;">
                        <p style="font-size: 18px;">邀请码</p>
                    </button>
                </div>
                <div class="tab-content">
                    <div class="tabPane active" id="tab_1" onmouseover="showAlter('alter')"
                        onmouseout="hideAlter('alter')" style="display:block;">
                        <ul class="collect-list attention" style="position: relative;left:35px;width:92%;">
                            {% for bugid,follow in followlist.items() %}
                            <li class="myFollow" style="width:95%;">
                                <a href="{{url_for('bugdetail',id=bugid)}}">{{follow}}</a>
                                <button
                                    onclick="window.location.href='{{ url_for('UnFollow',bugid=bugid)}}'">取消关注</button>
                            </li>
                            {% endfor %}
                        </ul>
                    </div>
                    <div class="tabPane tabAsset" id="tab_2" style="display:none;">
                        <form class="myForm" method="POST" action="" id="task" name="myTask">
                            <input type="text" placeholder="请输入资产名：" name="asset" />
                            <textarea name="assets" rows="10" cols="30" placeholder="请输入新建资产:"></textarea>
                            <button class="newtask" type="submit">新建资产</button>
                        </form>
                        <ul class="collect-list assetList">
                            {% for asset in assetname %}
                            <li> <a href="{{url_for('assetdetail',name=asset)}}">资产名称:{{asset}}</a>
                                <button
                                    onclick="window.location.href='{{ url_for('DeleteAsset',name=asset)}}'">删除资产</button>
                            </li>
                            {% endfor %}
                        </ul>
                    </div>
                    <div class="tabPane tab-inv" id="tab_3" style="display:none;">
                        <p>{{temp}}</p>
                        <button onclick="window.location.href='{{ url_for('GenInvitationCode')}}'">点击生成邀请码</button>
                        <p>已生成的邀请码</p>
                        {% for code in allcode %}
                        <p>{{code.code}}</p>
                        {% endfor %}
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}